// get 请求打印参数
// http://localhost:3000/?user=jspang&age=18  例如仿问
const Koa=require('koa');
const views=require('koa-views');
const path=require('path');
const app=new Koa();

app.use(views(path.join(__dirname,'./view'),{
    extension:'ejs'
}))

app.use(async(ctx)=>{

    let title='hello jspang'
    await ctx.render('index',{title})

});

app.listen(3000,()=>{
    console.log("starting at port 3000")
})
